#ifndef FORM_FWJG_H
#define FORM_FWJG_H

#include <QWidget>
#include <QFileInfo>
#include <QHash>
#include <QTableWidget>
#include <QTextEdit>

#define from_ui_name 1
#define from_ui_yztxname 2

namespace Ui {
class Form_fwjg;
}

class Form_fwjg : public QWidget
{
    Q_OBJECT
friend class MainWindow;
public:
    explicit Form_fwjg(QWidget *parent = nullptr);
    ~Form_fwjg();
    void setTextEdit(QTextEdit *textEdit){this->textEdit=textEdit;};
private slots:

    void on_pushButton_join_is_clicked();

    void on_pushButton_fwjg_is_clicked();

    void closeEvent(QCloseEvent *event) override;

    void on_pushButton_qx_clicked();

    void on_pushButton_qx_2_clicked();

    void on_tableWidget_set_cellClicked(int row, int column);

    void on_pushButton_mx_is_clicked();

    void on_pushButton_fwjg_shared_clicked();

    void on_pushButton_car_clicked();

signals:
    void closeSignal();
    void sharedSignal();
private:
    Ui::Form_fwjg *ui;          //
    QTextEdit *textEdit;
    QString imName;
    QString suffix;
    int fwjgCount=0;            //访问结构数量
    QList<int> fwjgNumSet;      //访问结构编号集合
    int participantCount=0;     //参与者的数量
    QVector<QStringList> accessStructure{};//授权集合
    QString carIamgePos{};
    std::function<void(std::string)> fun;
private:
    void setEditTriggersForColumn(QTableWidget* tWid,int c,Qt::ItemFlag flag=Qt::NoItemFlags);
};

#endif // FORM_FWJG_H
